/**
 * 
 */
package com.swim.phonenumprivacy.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.swim.natatoriuminfo.entity.NatatoriumInfo;

/**
 * 游泳馆隐私号码呼叫记录Entity
 * @author ljw
 * @version 2024-01-14
 */
@Table(name="t_natatorium_call_info", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="natatorium_info_id", attrName="natatoriumInfoId", label="游泳馆信息id"),
		@Column(name="peer_no", attrName="peerNo", label="主叫号码"),
		@Column(name="phone_no", attrName="phoneNo", label="被叫号码"),
		@Column(name="called_display_no", attrName="calledDisplayNo", label="显示号码"),
		@Column(name="call_time", attrName="callTime", label="主叫拨打时间"),
		@Column(name="start_time", attrName="startTime", label="被叫接听时间"),
		@Column(name="release_time", attrName="releaseTime", label="通话结束时间"),
		@Column(name="call_duration", attrName="callDuration", label="通话时长"),
		@Column(includeEntity=DataEntity.class),
	},  joinTable={
			@JoinTable(type=Type.LEFT_JOIN, entity=NatatoriumInfo.class, alias="ni", on="a.natatorium_info_id = ni.id", attrName="natatoriumInfo", 
					columns={
							@Column(name="name", attrName="name", label="场馆名称", queryType=QueryType.LIKE),
					}),
	}, orderBy="a.update_date DESC"
)
public class NatatoriumCallInfo extends DataEntity<NatatoriumCallInfo> {
	
	private static final long serialVersionUID = 1L;
	private String natatoriumInfoId;		// 游泳馆信息id
	private String peerNo;		// 主叫号码
	private String phoneNo;		// 被叫号码
	private String calledDisplayNo;		// 显示号码
	private String callTime;		// 主叫拨打时间
	private String startTime;		// 被叫接听时间
	private String releaseTime;		// 通话结束时间
	private String callDuration;		// 通话时长
	
	private NatatoriumInfo natatoriumInfo;		// 游泳馆信息
	
	public NatatoriumCallInfo() {
		this(null);
	}

	public NatatoriumCallInfo(String id){
		super(id);
	}
	
	@NotBlank(message="游泳馆信息id不能为空")
	@Length(min=0, max=64, message="游泳馆信息id长度不能超过 64 个字符")
	public String getNatatoriumInfoId() {
		return natatoriumInfoId;
	}

	public void setNatatoriumInfoId(String natatoriumInfoId) {
		this.natatoriumInfoId = natatoriumInfoId;
	}
	
	@NotBlank(message="主叫号码不能为空")
	@Length(min=0, max=20, message="主叫号码长度不能超过 20 个字符")
	public String getPeerNo() {
		return peerNo;
	}

	public void setPeerNo(String peerNo) {
		this.peerNo = peerNo;
	}
	
	@NotBlank(message="被叫号码不能为空")
	@Length(min=0, max=20, message="被叫号码长度不能超过 20 个字符")
	public String getPhoneNo() {
		return phoneNo;
	}

	public void setPhoneNo(String phoneNo) {
		this.phoneNo = phoneNo;
	}
	
	@NotBlank(message="显示号码不能为空")
	@Length(min=0, max=20, message="显示号码长度不能超过 20 个字符")
	public String getCalledDisplayNo() {
		return calledDisplayNo;
	}

	public void setCalledDisplayNo(String calledDisplayNo) {
		this.calledDisplayNo = calledDisplayNo;
	}
	
	@NotBlank(message="主叫拨打时间不能为空")
	@Length(min=0, max=25, message="主叫拨打时间长度不能超过 25 个字符")
	public String getCallTime() {
		return callTime;
	}

	public void setCallTime(String callTime) {
		this.callTime = callTime;
	}
	
	@NotBlank(message="被叫接听时间不能为空")
	@Length(min=0, max=25, message="被叫接听时间长度不能超过 25 个字符")
	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	
	@NotBlank(message="通话结束时间不能为空")
	@Length(min=0, max=25, message="通话结束时间长度不能超过 25 个字符")
	public String getReleaseTime() {
		return releaseTime;
	}

	public void setReleaseTime(String releaseTime) {
		this.releaseTime = releaseTime;
	}

	public String getCallDuration() {
		return callDuration;
	}

	public void setCallDuration(String callDuration) {
		this.callDuration = callDuration;
	}

	public NatatoriumInfo getNatatoriumInfo() {
		return natatoriumInfo;
	}

	public void setNatatoriumInfo(NatatoriumInfo natatoriumInfo) {
		this.natatoriumInfo = natatoriumInfo;
	}
	
}